import { fileURLToPath, URL } from 'node:url'

import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import { name } from './package.json'
import qiankun from 'vite-plugin-qiankun'

const useDevMode = true

// https://vite.dev/config/
export default defineConfig({
  plugins: [
    vue(),
    qiankun(name, { useDevMode })
  ],
  resolve: {
    alias: {
      '@': fileURLToPath(new URL('./src', import.meta.url))
    },
  },
  server:{
    headers:{
      'Access-Control-Allow-Origin': '*'
    },
    host:'0.0.0.0',
    port:3020,
    https:undefined
  }
})
